home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / termutil.0 / termutil / termutils-2.0 / tput.info < prev    next >
Encoding:
GNU Info File  |  1995-11-30  |  28.8 KB  |  821 lines

  1. This is Info file tput.info, produced by Makeinfo-1.55 from the input
  2. file tput.texi.
  3.  
  4. START-INFO-DIR-ENTRY
  5. * tput: (tput).                 tput and tabs utilities for terminal control.
  6. END-INFO-DIR-ENTRY
  7.  
  8.    Portable Terminal Control From Scripts
  9.  
  10.    This file documents the the GNU `tput' and `tabs' commands, version
  11. 2.0, for translating terminal capability names into escape and control
  12. codes for a particular terminal.
  13.  
  14.    Copyright (C) 1991, 1995 Free Software Foundation, Inc.
  15.  
  16.    Permission is granted to make and distribute verbatim copies of this
  17. manual provided the copyright notice and this permission notice are
  18. preserved on all copies.
  19.  
  20.    Permission is granted to copy and distribute modified versions of
  21. this manual under the conditions for verbatim copying, provided that
  22. the entire resulting derived work is distributed under the terms of a
  23. permission notice identical to this one.
  24.  
  25.    Permission is granted to copy and distribute translations of this
  26. manual into another language, under the above conditions for modified
  27. versions, except that this permission notice may be stated in a
  28. translation approved by the Foundation.
  29.  
  30. 
  31. File: tput.info,  Node: Top,  Next: Invoking tput,  Up: (dir)
  32.  
  33.    This file documents the the GNU `tput' and `tabs' commands, version
  34. 2.0, for translating terminal capability names into escape and control
  35. codes for a particular terminal.
  36.  
  37. * Menu:
  38.  
  39. * Invoking tput::          Portable terminal control.
  40. * Invoking tabs::          Portable terminal tab setting.
  41.  
  42.  -- The Detailed Node Listing --
  43.  
  44. `tput': Portable Terminal Control
  45.  
  46. * Using tput::     Using `tput'.
  47. * Output::       Output and exit status.
  48. * More Examples::  More examples of using `tput'.
  49. * Capabilities::   Summary of terminfo capabilities.
  50. * Error Messages:: Error messages produced by `tput'.
  51.  
  52. `tabs': Setting Terminal Tabs
  53.  
  54. * Options::    Options supported by GNU `tabs'
  55. * Tabspec::    Specifying tab stops
  56. * Canned::    Canned tab specifications
  57. * Examples::    Examples
  58.  
  59. 
  60. File: tput.info,  Node: Invoking tput,  Next: Invoking tabs,  Prev: Top,  Up: Top
  61.  
  62. `tput': Portable Terminal Control
  63. *********************************
  64.  
  65.    The `tput' command allows shell scripts to do things like clear the
  66. screen, underline text, and center text no matter how wide the screen
  67. is.  To do these things, it translates the terminal-independent name of
  68. a terminal capability into its actual value for the terminal type being
  69. used.
  70.  
  71.    `tput' takes as an argument the name of a Unix System V terminfo
  72. capability, which it translates into the equivalent termcap capability
  73. name (*note Capabilities::., for a list of the equivalencies).
  74. Terminfo is a database that is similar to termcap but which has
  75. different capability names and is stored in a different format.  The GNU
  76. `tput' command takes a terminfo name as an argument to make it
  77. compatible with the Unix System V `tput' command.
  78.  
  79.    There are three types of terminfo (and termcap) capabilities: string,
  80. Boolean, and numeric.  String capabilities either cause a special
  81. effect on the terminal when they are displayed or are the value sent by
  82. a special key on the terminal (the latter type are probably of no use
  83. in shell scripts).  Numeric and Boolean capabilities give information
  84. about the terminal such as how many columns wide it is or whether
  85. whether it has a meta key.  *Note Output::, for more detailed
  86. information on the three types of capabilities.
  87.  
  88.    The format of the `tput' command is illustrated below.
  89.  
  90.      tput [OPTIONS] CAPABILITY [PARAMETER ...]
  91.      tput [OPTIONS] longname
  92.      tput [OPTIONS] init
  93.      tput [OPTIONS] reset
  94.  
  95. GNU `tput' takes the following options:
  96.  
  97.      [-T TERMINAL-TYPE] [--terminal=TERMINAL-TYPE]
  98.      [-t] [--termcap]
  99.      [-S] [--standard-input]
  100.      [-V] [--version]
  101.  
  102.    Here is an example of how to clear the terminal screen using `tput':
  103.  
  104.      tput clear
  105.  
  106. * Menu:
  107.  
  108. * Using tput::     Using `tput'.
  109. * Output::       Output and exit status.
  110. * More Examples::  More examples of using `tput'.
  111. * Capabilities::   Summary of terminfo capabilities.
  112. * Error Messages:: Error messages produced by `tput'.
  113.  
  114. 
  115. File: tput.info,  Node: Using tput,  Next: Output,  Up: Top
  116.  
  117. Using `tput'
  118. ============
  119.  
  120.    The format of the `tput' command is illustrated below.
  121.  
  122.      tput [OPTIONS] CAPABILITY [PARAMETER ...]
  123.      tput [OPTIONS] longname
  124.      tput [OPTIONS] init
  125.      tput [OPTIONS] reset
  126.  
  127. GNU `tput' takes the following options:
  128.  
  129.      [-T TERMINAL-TYPE] [--terminal=TERMINAL-TYPE]
  130.      [-t] [--termcap]
  131.      [-S] [--standard-input]
  132.      [-V] [--version]
  133.  
  134.    Some string capabilities accept parameters, such as the number of
  135. lines to delete or the column to move to.  These parameters are
  136. specified on the command line following the capability name.  They are
  137. always numbers.
  138.  
  139. `-T TERMTYPE'
  140. `--terminal=TERMTYPE'
  141.      This option indicates the type of terminal.  By default, this
  142.      value is taken from the `TERM' environment variable.
  143.  
  144. `-t'
  145. `--termcap'
  146.      GNU `tput' by default accepts termcap name if the capability a
  147.      user specifies is not a terminfo name.  This option tells `tput'
  148.      not to try terminfo names and look up only termcap names.
  149.  
  150. `-S'
  151. `--standard-input'
  152.      This option tells `tput' to read a sequence of capabilities and
  153.      parameters from the standard input.  Only string capabilities can
  154.      be used in this mode.
  155.  
  156. `-V'
  157. `--version'
  158.      This option displays the version of `tput'.
  159.  
  160.    When `longname' is specified, `tput' displays the long descriptive
  161. name for the terminal type.
  162.  
  163.    When `init' is specified, `tput' sends the initialization strings
  164. for the terminal.  If the terminal's tab width is other than 8, and it
  165. cannot be reset, the tab expansion in the tty driver is turned on.
  166. Otherwise, tab width is reset to 8 and the tab expansion is turned off.
  167.  
  168.    When `reset' is specified, `tput' sends the reset strings for the
  169. terminal and then follows the same initialization sequence as `tput'
  170. `init'.
  171.  
  172.    Below are some example uses of `tput'.  *Note Capabilities::, for a
  173. complete list of the functions that `tput' can cause terminals to
  174. perform.  Note that not all terminals can perform any given function.
  175. *Note More Examples::, for some more complex samples of `tput' use.
  176.  
  177.    The following command moves the cursor to row 10, column 30 of the
  178. screen:
  179.  
  180.      tput cup 10 30
  181.  
  182.    The following command makes the cursor invisible:
  183.  
  184.      tput civis
  185.  
  186.    The following command makes the cursor visible again:
  187.  
  188.      tput cnorm
  189.  
  190.    The following command deletes 10 lines below and including the one
  191. on which the cursor is positioned:
  192.  
  193.      tput dl 10
  194.  
  195. 
  196. File: tput.info,  Node: Output,  Next: More Examples,  Prev: Using tput,  Up: Top
  197.  
  198. Output and Exit Status
  199. ======================
  200.  
  201.    The `tput' command produces different kinds of output for each of
  202. the three types of terminal capabilities: string, numeric, and Boolean.
  203.  
  204.    If the terminfo capability given on the command line is a string
  205. capability, `tput' displays its value and exits with a status of 0.  If
  206. the capability is not defined for the terminal type being used, `tput'
  207. produces no output and exits with a status of 1.
  208.  
  209.    If the capability is a numeric capability, `tput' displays its value
  210. (an integer).  If the capability is not defined for the terminal type
  211. being used, `tput' displays the value `-1'.  The exit status is always
  212. 0 for numeric capabilities, unless an error occurs (*note Error
  213. Messages::. for a complete list of the possible exit status values).
  214.  
  215.    If the capability is a Boolean capability, `tput' produces no output
  216. and exits with status 0 if the capability is defined for the terminal
  217. type being used, or status 1 if the capability is not defined.  *Note
  218. Definitions of the Terminal Capabilities: (termcap)Capabilities, for a
  219. more detailed description of termcap capabilities.
  220.  
  221.    The values of numeric capabilities should be saved into shell
  222. variables so they can be used later without having to run `tput' again.
  223. Here is how it can be done:
  224.  
  225.      For the Bourne, Bourne-again, and Korn shells:
  226.      
  227.      To set an environment variable: COLUMNS=`tput cols` export COLUMNS
  228.      
  229.      To set a local variable: tabwidth=`tput it`
  230.      
  231.      For the C shell:
  232.      
  233.      To set an environment variable: setenv COLUMNS `tput cols`
  234.      
  235.      To set a local variable: set tabwidth = `tput it`
  236.  
  237. The values of string capabilities can be saved in shell variables in the
  238. same way, then displayed later using the `echo' command. Since `echo'
  239. is built into most shells, it runs more quickly than `tput' does.
  240. However, using `echo' instead of `tput' to display string values can
  241. cause problems for capabilities that use padding, because null padding
  242. characters cannot be passed as arguments to commands, including `echo'.
  243.  
  244. 
  245. File: tput.info,  Node: More Examples,  Next: Capabilities,  Prev: Output,  Up: Top
  246.  
  247. Yet More Examples
  248. =================
  249.  
  250.    Here are some more advanced examples of using `tput'; most involve
  251. some shell programming.  Because the C shell's flow control (decision
  252. making) constructs differ from those of the other shells, these
  253. examples do not work under the C shell.
  254.  
  255.    The following sequence of commands prints `I am infalible' and then
  256. crosses it out on terminals that can overstrike, and prints `I am on
  257. strike' on terminals that cannot.
  258.  
  259.      if tput os; then
  260.          echo 'I am infalible\r- -- ---------'
  261.      else
  262.          echo 'I am on strike'
  263.      fi
  264.  
  265.    The following example is a shell script that centers a line of text
  266. given as command line arguments.  An alternative approach would be to
  267. have `tput' send the `rep' terminfo capability to print the multiple
  268. spaces instead of using the `while' loop.
  269.  
  270.      COLUMNS=`tput cols` export COLUMNS # Get screen width.
  271.      echo "$@" | awk '
  272.      { spaces = ('$COLUMNS' - length) / 2
  273.        while (spaces-- > 0) printf (" ")
  274.        print
  275.      }'
  276.  
  277.    The following commands cause the terminal to save the current cursor
  278. position, print `Hello, World' centered in the screen in reverse video,
  279. then return to the original cursor position.
  280.  
  281.      COLUMNS=`tput cols`
  282.      LINES=`tput lines`
  283.      line=`expr $LINES / 2`
  284.      column=`expr \( $COLUMNS - 6 \) / 2`
  285.      tput sc
  286.      tput cup $line $column
  287.      tput rev
  288.      echo 'Hello, World'
  289.      tput sgr0
  290.      tput rc
  291.  
  292.    The middle three lines of the above example can also be written
  293. using `--standard-input'.
  294.  
  295.      tput --standard-input <<EOF
  296.      sc
  297.      cup $line $column
  298.      rev
  299.      EOF
  300.  
  301. 
  302. File: tput.info,  Node: Capabilities,  Next: Error Messages,  Prev: More Examples,  Up: Top
  303.  
  304. Capabilities
  305. ============
  306.  
  307. Boolean Capabilities
  308. --------------------
  309.  
  310.      Name    Termcap Description
  311.              Equiv.
  312.      
  313.      am      am      Has automatic margins
  314.      bw      bw      `cub1' wraps from column 0 to last column
  315.      chts    HC      Cursor is hard to see
  316.      da      da      Display may be retained above screen
  317.      db      db      Display may be retained below screen
  318.      eo      eo      Can erase overstrikes with a blank
  319.      eslok   es      Using escape on status line is ok
  320.      gn      gn      Generic line type (e.g., `dialup', `switch')
  321.      hc      hc      Hardcopy terminal
  322.      hs      hs      Has a status line
  323.      hz      hz      Hazeltine; cannot print tildes
  324.      in      in      Insert mode distinguishes nulls
  325.      km      km      Has a meta key (a shift that sets parity bit)
  326.      mc5i    5i      Data sent to printer does not echo on screen
  327.      mir     mi      Safe to move while in insert mode
  328.      msgr    ms      Safe to move in standout modes
  329.      npc     NP      No pad character is needed
  330.      nrrmc   NR      `smcup' does not reverse `rmcup'
  331.      nxon    nx      Padding does not work; xon/xoff is required
  332.      os      os      Overstrikes
  333.      ul      ul      Underline character overstrikes
  334.      xenl    xn      Newline ignored after 80 columns (Concept)
  335.      xhp     xs      Standout is not erased by overwriting (HP)
  336.      xon     xo      Uses xon/xoff handshaking
  337.      xsb     xb      Beehive (f1=escape, f2=ctrl-c)
  338.      xt      xt      Tabs are destructive, magic `smso' (t1061)
  339.  
  340. Numeric Capabilities
  341. --------------------
  342.  
  343.      Name    Termcap Description
  344.              Equiv.
  345.      
  346.      cols    co      Number of columns in a line
  347.      it      it      Width of initial tab settings
  348.      lh      lh      Number of rows in each label
  349.      lines   li      Number of lines on screen or page
  350.      lm      lm      Lines of memory if > `lines'; 0 means varies
  351.      lw      lw      Number of columns in each label
  352.      nlab    Nl      Number of labels on screen (start at 1)
  353.      pb      pb      Lowest baud rate where padding is needed
  354.      vt      vt      Virtual terminal number (CB/Unix)
  355.      wsl     ws      Number of columns in status line
  356.      xmc     sg      Number of blanks left by `smso' or `rmso'
  357.  
  358. String Capabilities
  359. -------------------
  360.  
  361.    In the following table, `(P)' following an explanation means that
  362. the capability takes one or more parameters (and is evaluated by the
  363. `tparam' function, or in the case of `cup', `tgoto'); `(*)' means that
  364. padding may be based on the number of lines affected; and `#n' refers
  365. to the `n'th parameter.
  366.  
  367.      Name    Termcap Description
  368.              Equiv.
  369.      
  370.      acsc    ac      Graphic character set pairs aAbBcC - default vt100
  371.      bel     bl      Ring bell (beep)
  372.      blink   mb      Begin blinking mode
  373.      bold    md      Begin double intensity mode
  374.      cbt     bt      Back tab
  375.      civis   vi      Make cursor invisible
  376.      clear   cl      Clear screen (*)
  377.      cmdch   CC      Settable command character in prototype
  378.      cnorm   ve      Make cursor normal (undo `cvvis' & `civis)'
  379.      cr      cr      Carriage return (*)
  380.      csr     cs      Change scrolling region to lines #1 through #2 (P)
  381.      cub     LE      Move cursor left #1 spaces (P)
  382.      cub1    le      Move cursor left one space
  383.      cud     DO      Move cursor down #1 lines (P*)
  384.      cud1    do      Move cursor down one line
  385.      cuf     RI      Move cursor right #1 spaces (P*)
  386.      cuf1    nd      Move cursor right one space
  387.      cup     cm      Move cursor to row #1, column #2 of screen (P)
  388.      cuu     UP      Move cursor up #1 lines (P*)
  389.      cuu1    up      Move cursor up one line
  390.      cvvis   vs      Make cursor very visible
  391.      dch     DC      Delete #1 characters (P*)
  392.      dch1    dc      Delete one character (*)
  393.      dim     mh      Begin half intensity mode
  394.      dl      DL      Delete #1 lines (P*)
  395.      dl1     dl      Delete one line (*)
  396.      dsl     ds      Disable status line
  397.      ech     ec      Erase #1 characters (P)
  398.      ed      cd      Clear to end of display (*)
  399.      el      ce      Clear to end of line
  400.      el1     cb      Clear to beginning of line, inclusive
  401.      enacs   eA      Enable alternate character set
  402.      ff      ff      Form feed for hardcopy terminal (*)
  403.      flash   vb      Visible bell (must not move cursor)
  404.      fsl     fs      Return from status line
  405.      hd      hd      Move cursor down one-half line
  406.      home    ho      Home cursor (if no `cup')
  407.      hpa     ch      Move cursor to column #1 (P)
  408.      ht      ta      Tab to next 8 space hardware tab stop
  409.      hts     st      Set a tab in all rows, current column
  410.      hu      hu      Move cursor up one-half line
  411.      ich     IC      Insert #1 blank characters (P*)
  412.      ich1    ic      Insert one blank character
  413.      if      if      Name of file containing initialization string
  414.      il      AL      Add #1 new blank lines (P*)
  415.      il1     al      Add one new blank line (*)
  416.      ind     sf      Scroll forward (up) one line
  417.      indn    SF      Scroll forward #1 lines (P)
  418.      invis   mk      Begin invisible text mode
  419.      ip      ip      Insert pad after character inserted (*)
  420.      iprog   iP      Path of program for initialization
  421.      is1     i1      Terminal initialization string
  422.      is2     is      Terminal initialization string
  423.      is3     i3      Terminal initialization string
  424.      kBEG    &9      Shifted beginning key
  425.      kCAN    &0      Shifted cancel key
  426.      kCMD    *1      Shifted command key
  427.      kCPY    *2      Shifted copy key
  428.      kCRT    *3      Shifted create key
  429.      kDC     *4      Shifted delete char key
  430.      kDL     *5      Shifted delete line key
  431.      kEND    *7      Shifted end key
  432.      kEOL    *8      Shifted clear line key
  433.      kEXT    *9      Shifted exit key
  434.      kFND    *0      Shifted find key
  435.      kHLP    #1      Shifted help key
  436.      kHOM    #2      Shifted home key
  437.      kIC     #3      Shifted input key
  438.      kLFT    #4      Shifted left arrow key
  439.      kMOV    %b      Shifted move key
  440.      kMSG    %a      Shifted message key
  441.      kNXT    %c      Shifted next key
  442.      kOPT    %d      Shifted options key
  443.      kPRT    %f      Shifted print key
  444.      kPRV    %e      Shifted prev key
  445.      kRDO    %g      Shifted redo key
  446.      kRES    %j      Shifted resume key
  447.      kRIT    %i      Shifted right arrow
  448.      kRPL    %h      Shifted replace key
  449.      kSAV    !1      Shifted save key
  450.      kSPD    !2      Shifted suspend key
  451.      kUND    !3      Shifted undo key
  452.      ka1     K1      Upper left of keypad
  453.      ka3     K3      Upper right of keypad
  454.      kb2     K2      Center of keypad
  455.      kbeg    @1      Beginning key
  456.      kbs     kb      Backspace key
  457.      kc1     K4      Lower left of keypad
  458.      kc3     K5      Lower right of keypad
  459.      kcan    @2      Cancel key
  460.      kcbt    kB      Back tab key
  461.      kclo    @3      Close key
  462.      kclr    kC      Clear screen or erase key
  463.      kcmd    @4      Command key
  464.      kcpy    @5      Copy key
  465.      kcrt    @6      Create key
  466.      kctab   kt      Clear tab key
  467.      kcub1   kl      Left arrow key
  468.      kcud1   kd      Down arrow key
  469.      kcuf1   kr      Right arrow key
  470.      kcuu1   ku      Up arrow key
  471.      kdch1   kD      Delete character key
  472.      kdl1    kL      Delete line key
  473.      ked     kS      Clear to end of screen key
  474.      kel     kE      Clear to end of line key
  475.      kend    @7      End key
  476.      kent    @8      Enter/send key (unreliable)
  477.      kext    @9      Exit key
  478.      kf0     k0      Function key f0
  479.      kf1     k1      Function key f1
  480.      kf10    k;      Function key f10
  481.      kf11    F1      Function key f11
  482.      kf12    F2      Function key f12
  483.      kf13    F3      Function key f13
  484.      kf14    F4      Function key f14
  485.      kf15    F5      Function key f15
  486.      kf16    F6      Function key f16
  487.      kf17    F7      Function key f17
  488.      kf18    F8      Function key f18
  489.      kf19    F9      Function key f19
  490.      kf2     k2      Function key f2
  491.      kf20    FA      Function key f20
  492.      kf21    FB      Function key f21
  493.      kf22    FC      Function key f22
  494.      kf23    FD      Function key f23
  495.      kf24    FE      Function key f24
  496.      kf25    FF      Function key f25
  497.      kf26    FG      Function key f26
  498.      kf27    FH      Function key f27
  499.      kf28    FI      Function key f28
  500.      kf29    FJ      Function key f29
  501.      kf3     k3      Function key f3
  502.      kf30    FK      Function key f30
  503.      kf31    FL      Function key f31
  504.      kf32    FM      Function key f32
  505.      kf33    FN      Function key f13
  506.      kf34    FO      Function key f34
  507.      kf35    FP      Function key f35
  508.      kf36    FQ      Function key f36
  509.      kf37    FR      Function key f37
  510.      kf38    FS      Function key f38
  511.      kf39    FT      Function key f39
  512.      kf4     k4      Function key f4
  513.      kf40    FU      Function key f40
  514.      kf41    FV      Function key f41
  515.      kf42    FW      Function key f42
  516.      kf43    FX      Function key f43
  517.      kf44    FY      Function key f44
  518.      kf45    FZ      Function key f45
  519.      kf46    Fa      Function key f46
  520.      kf47    Fb      Function key f47
  521.      kf48    Fc      Function key f48
  522.      kf49    Fd      Function key f49
  523.      kf5     k5      Function key f5
  524.      kf50    Fe      Function key f50
  525.      kf51    Ff      Function key f51
  526.      kf52    Fg      Function key f52
  527.      kf53    Fh      Function key f53
  528.      kf54    Fi      Function key f54
  529.      kf55    Fj      Function key f55
  530.      kf56    Fk      Function key f56
  531.      kf57    Fl      Function key f57
  532.      kf58    Fm      Function key f58
  533.      kf59    Fn      Function key f59
  534.      kf6     k6      Function key f6
  535.      kf60    Fo      Function key f60
  536.      kf61    Fp      Function key f61
  537.      kf62    Fq      Function key f62
  538.      kf63    Fr      Function key f63
  539.      kf7     k7      Function key f7
  540.      kf8     k8      Function key f8
  541.      kf9     k9      Function key f9
  542.      kfnd    @0      Find key
  543.      khlp    %1      Help key
  544.      khome   kh      Home key
  545.      khts    kT      Set tab key
  546.      kich1   kI      Ins char/enter ins mode key
  547.      kil1    kA      Insert line key
  548.      kind    kF      Scroll forward/down key
  549.      kll     kH      Home down key
  550.      kmov    %4      Move key
  551.      kmrk    %2      Mark key
  552.      kmsg    %3      Message key
  553.      knp     kN      Next page key
  554.      knxt    %5      Next object key
  555.      kopn    %6      Open key
  556.      kopt    %7      Options key
  557.      kpp     kP      Previous page key
  558.      kprt    %9      Print or copy key
  559.      kprv    %8      Previous object key
  560.      krdo    %0      Redo key
  561.      kref    &1      Reference key
  562.      kres    &5      Resume key
  563.      krfr    &2      Refresh key
  564.      kri     kR      Scroll backward/up key
  565.      krmir   kM      `rmir' or `smir' in insert mode
  566.      krpl    &3      Replace key
  567.      krst    &4      Restart key
  568.      ksav    &6      Save key
  569.      kslt    *6      Select key
  570.      kspd    &7      Suspend key
  571.      ktbc    ka      Clear all tabs key
  572.      kund    &8      Undo key
  573.      lf0     l0      Label on function key f0 if not `f0'
  574.      lf1     l1      Label on function key f1 if not `f1'
  575.      lf10    la      Label on function key f10 if not `f10'
  576.      lf2     l2      Label on function key f2 if not `f2'
  577.      lf3     l3      Label on function key f3 if not `f3'
  578.      lf4     l4      Label on function key f4 if not `f4'
  579.      lf5     l5      Label on function key f5 if not `f5'
  580.      lf6     l6      Label on function key f6 if not `f6'
  581.      lf7     l7      Label on function key f7 if not `f7'
  582.      lf8     l8      Label on function key f8 if not `f8'
  583.      lf9     l9      Label on function key f9 if not `f9'
  584.      ll      ll      Go to last line, first column (if no `cup')
  585.      mc0     ps      Print screen contents
  586.      mc4     pf      Turn printer off
  587.      mc5     po      Turn printer on
  588.      mc5p    pO      Turn printer on for #1 bytes (P)
  589.      mgc     MC      Clear left and right soft margins
  590.      mrcup   CM      Move cursor to row #1, column #2 of memory (P)
  591.      nel     nw      Newline (like cr followed by lf)
  592.      pad     pc      Pad character (rather than nul)
  593.      pfkey   pk      Program function key #1 to type string #2 (P)
  594.      pfloc   pl      Program function key #1 to execute string #2 (P)
  595.      pfx     px      Program function key #1 to transmit string #2 (P)
  596.      pln     pn      Program label #1 to show string #2 (P)
  597.      prot    mp      Begin protected mode
  598.      rc      rc      Restore cursor to position of last `sc'
  599.      rep     rp      Repeat character #1, #2 times (P*)
  600.      rev     mr      Begin reverse video mode
  601.      rf      rf      Name of file containing reset string
  602.      rfi     RF      Send next input character (for ptys)
  603.      ri      sr      Scroll backward (down) one line
  604.      rin     SR      Scroll backward #1 lines (P)
  605.      rmacs   ae      End alternate character set
  606.      rmam    RA      Turn off automatic margins
  607.      rmcup   te      String to end programs that use `cup'
  608.      rmdc    ed      End delete mode
  609.      rmir    ei      End insert mode
  610.      rmkx    ke      End keypad transmit mode
  611.      rmln    LF      Turn off soft labels
  612.      rmm     mo      End meta mode
  613.      rmp     rP      Like `ip' but when in replace mode
  614.      rmso    se      End standout mode
  615.      rmul    ue      End underscore mode
  616.      rmxon   RX      Turn off xon/xoff handshaking
  617.      rs1     r1      Reset terminal to sane modes
  618.      rs2     r2      Reset terminal to sane modes
  619.      rs3     r3      Reset terminal to sane modes
  620.      sc      sc      Save cursor position
  621.      sgr     sa      Define video attributes #1 through #9 (P)
  622.      sgr0    me      Turn off all attributes
  623.      smacs   as      Begin alternate character set
  624.      smam    SA      Turn on automatic margins
  625.      smcup   ti      String to begin programs that use `cup'
  626.      smdc    dm      Begin delete mode
  627.      smgl    ML      Set soft left margin to #1 (P)
  628.      smgr    MR      Set soft right margin to #1 (P)
  629.      smir    im      Begin insert mode
  630.      smkx    ks      Begin keypad transmit mode
  631.      smln    LO      Turn on soft labels
  632.      smm     mm      Begin meta mode (8th bit set)
  633.      smso    so      Begin standout mode
  634.      smul    us      Begin underscore mode
  635.      smxon   SX      Turn on xon/xoff handshaking
  636.      tbc     ct      Clear all tab stops
  637.      tsl     ts      Go to status line, column #1 (P)
  638.      uc      uc      Underscore one character and move past it
  639.      vpa     cv      Move cursor to row #1 (P)
  640.      wind    wi      Set window to lines #1-#2, columns #3-#4 (P)
  641.      xoffc   XF      xoff character
  642.      xonc    XN      xon character
  643.  
  644. 
  645. File: tput.info,  Node: Error Messages,  Prev: Capabilities,  Up: Top
  646.  
  647. Error Messages
  648. ==============
  649.  
  650.    `tput' displays various error messages if problems occur.  In
  651. addition, it exits with one of the following status values:
  652.  
  653. 0
  654.      Normal status; the given capability is present.
  655.  
  656. 1
  657.      The given Boolean or string capability is not present.
  658.  
  659. 2
  660.      Usage error; `tput' was given invalid arguments.
  661.  
  662. 3
  663.      The terminal type given (either in the `TERM' environment variable
  664.      or by the `-T' switch) is unknown, or the termcap database can not
  665.      be read.
  666.  
  667. 4
  668.      The given capability is unknown.
  669.  
  670. 
  671. File: tput.info,  Node: Invoking tabs,  Prev: Invoking tput,  Up: Top
  672.  
  673. `tabs': Setting Terminal Tabs
  674. *****************************
  675.  
  676.    The `tabs' command is used to specify and set hardware tab stops on
  677. terminals that have remotely-settable tab stops.
  678.  
  679.    The `tabs' command is used to specify and set hardware tab stops on
  680. terminals that have remotely-settable tab stops.
  681.  
  682.      tabs [OPTIONS] TAB-SPECIFICATION
  683.  
  684. * Menu:
  685.  
  686. * Options::    Options supported by GNU `tabs'
  687. * Tabspec::    Specifying tab stops
  688. * Canned::    Canned tab specifications
  689. * Examples::    Examples
  690.  
  691. 
  692. File: tput.info,  Node: Options,  Next: Tabspec,  Up: Invoking tabs
  693.  
  694. Options
  695. =======
  696.  
  697.    The options supported by GNU `tabs' are:
  698.  
  699. `-T TERMTYPE'
  700. `--terminal=TERMTYPE'
  701.      Specify the terminal type, overriding the environment variable
  702.      `TERM'.
  703.  
  704. `-V'
  705. `--version'
  706.      Show the version number of GNU `tabs' and exit.
  707.  
  708. `-h'
  709. `--help'
  710.      Show the command line usage of GNU `tabs' and exit.
  711.  
  712. 
  713. File: tput.info,  Node: Tabspec,  Next: Canned,  Prev: Options,  Up: Invoking tabs
  714.  
  715. Tab Specification
  716. =================
  717.  
  718.    GNU `tabs' accepts the following types of tab specification:
  719.  
  720. `N1[,N2,...]'
  721.      Set tab stops at columns N1, N2, ... The leftmost column is the
  722.      column 1.  N2 and the rest of the list can be of the form `+NUM',
  723.      in which case it specifies the increment from the tab stop last
  724.      specified by the list.
  725.  
  726. `-N'
  727.      Set tab stops at every N columns.  For most of the terminals, the
  728.      standard tab stop setting is the equivalent of `-8'.
  729.  
  730. `-CODE'
  731. `--code=CODE'
  732. `-C CODE'
  733.      Set tab stops using one of the "canned" specification.  The second
  734.      and the third formats are useful if the name of the canned
  735.      specification conflicts with one of the long options supportred by
  736.      GNU `tabs'.
  737.  
  738. `--FILENAME'
  739. `--file=FILENAME'
  740. `--F FILENAME'
  741.      Read the first line of FILENAME, find parameters separated by
  742.      blanks enclosed by `<:' and `:>' on that line, find a parameter
  743.      that begins with `t', and then use it as tab specification.  If
  744.      any of the above steps fails, set tab stops to every 8 columns.
  745.      The second and the third formats are useful if the name of the
  746.      file conflicts with one of the long options supportred by GNU
  747.      `tabs'.
  748.  
  749. 
  750. File: tput.info,  Node: Canned,  Next: Examples,  Prev: Tabspec,  Up: Invoking tabs
  751.  
  752. Canned tab specifications
  753. =========================
  754.  
  755.    GNU `tabs' supports the following "canned" specifications:
  756.  
  757. `a'
  758.      Assembler, IBM S/370, first format (1,10,16,36,72)
  759.  
  760. `a2'
  761.      Assembler, IBM S/370, second format (1,10,16,40,72)
  762.  
  763. `c'
  764.      COBOL, normal format (1,8,12,16,20,55)
  765.  
  766. `c2'
  767.      COBOL, compact format (1,6,10,14,49)
  768.  
  769. `c3'
  770.      COBOL, compact format with more tab stops
  771.      (1,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,67)
  772.  
  773. `f'
  774.      FORTRAN (1,7,11,15,19,23)
  775.  
  776. `p'
  777.      PL/I (1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61)
  778.  
  779. `s'
  780.      SNOBOL (1,10,55)
  781.  
  782. `u'
  783.      UNIVAC 1100 Assembler (1,12,20,44)
  784.  
  785. 
  786. File: tput.info,  Node: Examples,  Prev: Canned,  Up: Invoking tabs
  787.  
  788. Examples
  789. ========
  790.  
  791.    To set tab stops for editing FORTRAN programs on an `xterm', use the
  792. following `tabs' command:
  793.      tabs -f --terminal=xterm
  794.  
  795.    Another example: a source file of FORTRAN program may contain its own
  796. tab specification on its first line:
  797.      C <: t1,7,11,15,19,23,72 :>
  798.  
  799.    Before editing this file, the `tabs' command can be used to set tab
  800. stops to columns this file expects:
  801.  
  802.      tabs --Sample.f
  803.  
  804.  
  805. 
  806. Tag Table:
  807. Node: Top1145
  808. Node: Invoking tput1974
  809. Node: Using tput4082
  810. Node: Output6557
  811. Node: More Examples8707
  812. Node: Capabilities10406
  813. Node: Error Messages25108
  814. Node: Invoking tabs25716
  815. Node: Options26277
  816. Node: Tabspec26671
  817. Node: Canned27973
  818. Node: Examples28676
  819. 
  820. End Tag Table
  821.